Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[torch] Rework torch.repeat to not broadcast unary case #4061

Merged
merged 9 commits into from
Mar 4, 2025

Conversation

rsuderman
Copy link
Contributor

Not all dimensions in torch.repeat may need to be broadcasted. Skip unsqueezing and flattening these dimensions together.

Not all dimensions in `torch.repeat` may need to be broadcasted. Skip
unsqueezing and flattening these dimensions together.
@rsuderman rsuderman requested a review from zjgarvey February 28, 2025 05:46
Copy link
Collaborator

@zjgarvey zjgarvey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but maybe use the util function to reduce some code duplication.

Copy link
Collaborator

@zjgarvey zjgarvey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits, otherwise looks good to me.

@rsuderman rsuderman merged commit 0d0653a into llvm:main Mar 4, 2025
3 checks passed
@rsuderman rsuderman deleted the repeat_rework branch March 4, 2025 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants